package com.supreme.uploadserver.service;

import com.alibaba.fastjson.JSONObject;
import org.apache.http.NameValuePair;

import java.util.List;
import java.util.Map;

public abstract class AbsHttpService<IT> {

    String GET_METHOD = "GET";

    String POST_METHOD = "POST";

    String PUT_METHOD = "PUT";

    String DELETE_METHOD = "DELETE";

    String UPLOAD_METHOD = "UPLOAD";

    abstract IT setMethod(String method);

    abstract IT setUrl(String url);

    abstract IT setEndpoint(String endpoint);

    abstract IT setPath(String path);

    abstract IT setQuery(List<NameValuePair> query);

    abstract IT setQuery(Map<String, String> query);

    abstract IT setQuery(JSONObject query);

    abstract IT setBody(JSONObject body);

    public JSONObject request() {
        return null;
    }
}
